package com.xjtu.platform.security.login.dao;

import com.xjtu.platform.security.login.LoginDto;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

/**
 * @创建人 MBY381
 * @创建时间 2022/6/29 11:42
 * @描述 暂无
 */

@Mapper
public interface LoginDao {


    @Select("select count(user_id) from user where user_id=#{user_id} and user_pwd=#{user_pwd}")
    int checkLogin(LoginDto dto);

    @Select("select role_web from user,role,user_role where user.user_id=#{user_id} and user_role.user_id=user.user_id and user_role.role_id=role.role_id")
    String finWebById(LoginDto dto);

    @Select("select count(email) from user where user_id=#{user_id}")
    int getEmail(String user_id);
}
